'''
Created on Jan 17, 2010

@author: roman

$Id: twitterstatus.py 17 2010-01-19 16:57:16Z sigizmund $
'''

from google.appengine.ext import db
from google.appengine.ext.search import SearchableModel

class TwitterStatus(SearchableModel):
    user = db.StringProperty(required = True)
    originalText = db.StringProperty(required = True)
    statusId = db.StringProperty(required = True)
    urls = db.StringListProperty()
    createdAt = db.DateTimeProperty(auto_now_add = True)
    json = db.Text()

def clearAll():
    statuses = TwitterStatus.all()
    for s in statuses:
        s.delete()